Skip to main content

Calculate Shipping Fee

POST /tms/shipping-route

Description

Calculate the shipping fee based on the provided buyer and seller locations' longitude and latitude.

Parameters

  • tenantId (string, header, required): The tenant ID.
  • countryCode (string, header, required): The country code.

Request Body

  • Media Type: application/json

Example Value

{
"buyerLocation": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string",
"city": "string"
},
"sellerLocations": {
"latitude": 0,
"longitude": 0,
"address": "string",
"userId": "string",
"city": "string"
}
}

Responses

This section outlines the possible responses from the TMS Route API.

Success Response (200)

The Success Response (200) is returned when the shipping fee calculation is successful. This response indicates the success of the operation and provides additional details.

Response Fields

FieldTypeDescription
statusbooleanIndicates the success of the shipping fee calculation.
statusCodeintegerNumeric code representing the status of the response (e.g., 0 for success).
messagestringA message indicating the outcome of the operation.
dataobjectContains the calculated shipping fee details.
errorsarrayAn array of objects providing details about any errors encountered during the request.

Media Type

application/json: The response is in JSON format.

Example Value

Schema:

{
"status": true,
"statusCode": 0,
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /tms/shipping-route \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!